/* 页面整体背景和字体 */
body {
  background: #f5f5f5;
  font-family: 'PingFang SC', 'Microsoft YaHei', Arial, sans-serif;
}

/* 容器样式 */
.container {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  margin: 40px auto;
  padding: 32px 24px 24px 24px;
  width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 顶部信息栏 */
.header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  font-size: 20px;
}
.header label {
  font-size: 18px;
  margin-right: 8px;
}
.header select {
  font-size: 16px;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid #ccc;
}

/* 错误计数样式 */
.error {
  color: #e53935;
  font-weight: bold;
  margin-left: 20px;
}

/* 计时器样式 */
.timer {
  color: #222;
  font-size: 18px;
  margin-left: 20px;
}

/* 数独棋盘样式 */
.sudoku-board {
  display: grid;
  grid-template-columns: repeat(9, 36px);
  grid-template-rows: repeat(9, 36px);
  gap: 0;
  border: 4px solid #222;
  background: #fff;
  margin-bottom: 24px;
}

/* 棋盘格子样式 */
.sudoku-cell {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  border: 1px solid #bbb;
  background: #fff;
  cursor: pointer;
  transition: background 0.2s;
  user-select: none;
}

/* 当前选中格子高亮 */
.sudoku-cell.selected {
  background: #e3f2fd;
}

/* 预填数字样式 */
.sudoku-cell.prefilled {
  color: #222;
  font-weight: bold;
  background: #f7f7f7;
  cursor: default;
}

/* 错误输入高亮 */
.sudoku-cell.error {
  background: #ffcdd2;
}

/* 提示高亮 */
.sudoku-cell.hint {
  background: #c8e6c9;
}

/* 棋盘格子边框处理，模拟粗线 */
.sudoku-board .sudoku-cell {
  box-sizing: border-box;
}
.sudoku-board .sudoku-cell:nth-child(3n) {
  border-right: 2px solid #222;
}
.sudoku-board .sudoku-cell:nth-child(n+19):nth-child(-n+27),
.sudoku-board .sudoku-cell:nth-child(n+46):nth-child(-n+54) {
  border-bottom: 2px solid #222;
}
.sudoku-board .sudoku-cell:nth-child(1),
.sudoku-board .sudoku-cell:nth-child(10),
.sudoku-board .sudoku-cell:nth-child(19),
.sudoku-board .sudoku-cell:nth-child(28),
.sudoku-board .sudoku-cell:nth-child(37),
.sudoku-board .sudoku-cell:nth-child(46),
.sudoku-board .sudoku-cell:nth-child(55),
.sudoku-board .sudoku-cell:nth-child(64),
.sudoku-board .sudoku-cell:nth-child(73) {
  border-left: 2px solid #222;
}
.sudoku-board .sudoku-cell:nth-child(-n+9) {
  border-top: 2px solid #222;
}

/* 操作按钮区 */
.controls {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
}

/* 按钮样式 */
.btn {
  background: #43a047;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 24px;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.2s;
}
.btn:hover {
  background: #388e3c;
}

/* 数字输入区 */
.number-pad {
  display: flex;
  justify-content: center;
  gap: 8px;
}

/* 数字按钮样式 */
.num-btn {
  background: #90caf9;
  color: #222;
  border: none;
  border-radius: 6px;
  width: 38px;
  height: 38px;
  font-size: 20px;
  cursor: pointer;
  margin-top: 4px;
  transition: background 0.2s;
}
.num-btn:hover {
  background: #64b5f6;
} 